package com.hcy.mqapi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

@SpringBootApplication(scanBasePackages = "com.hcy")
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.hcy")
public class MqApiApplication {

    public static void main(String[] args) {
        SpringApplication.run(MqApiApplication.class, args);
    }
    // 设置时区，防止new Date 时区不对
    @PostConstruct
    void started() {
        TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
    }
}
